#include <cstdio>
using namespace std;
const int maxn = 5005;
unsigned long long a[maxn], b[maxn];
unsigned long long n;
void init()
{
    for (int i = 0; i < 3; i++)
    {
        a[i] = 1;
        b[i] = 1;
    }
    for (int i = 3; i <= 5000; i++)
    {
        a[i] = 0;
        for (int j = 2; j <= i - 1; j++)
            a[i] = a[i] + b[j] * b[i - j + 1];
        b[i] = a[i];
        for (int j = 2; j <= i - 2; j++)
            b[i] = b[i] + b[j] * a[i - j + 1];
    }
}
int main()
{
    init();
    while (scanf("%llu", &n) != EOF)
        printf("%llu\n", b[n]);
    return 0;
}
